package com.gitee.cui.springcloud.order.service;

import com.gitee.cui.springcloud.order.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 库存业务类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-26 12:10
 **/
@FeignClient(value = "seata-storage-service")
public interface StorageService {

	/**
	 * 减库存功能
	 * @param productId 商品id
	 * @param count 减库存的数量
	 */
	@PostMapping("/storage/decrease")
	CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
